package org.db2.project.airline.model;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import java.io.Serializable;

/**
 * The persistent class for the BOOKINGSEAT database table.
 */
@Entity
public class BookingSeat implements Serializable {
    private static final long serialVersionUID = 1L;

    @Id
    @SequenceGenerator(name = "BOOKINGSEAT_ID_GENERATOR", sequenceName = "BOOKINGSEAT_SEQ")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "BOOKINGSEAT_ID_GENERATOR")
    private long id;

    private long seat;

    //bi-directional many-to-one association to Booking
    @ManyToOne
    @JoinColumn(name = "BOOKINGID")
    private Booking booking;

    //bi-directional many-to-one association to FlightClass
    @ManyToOne
    @JoinColumn(name = "FLIGHTCLASSID")
    private FlightClass flightClass;

    public BookingSeat() {
    }

    public long getId() {
        return this.id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public long getSeat() {
        return this.seat;
    }

    public void setSeat(long seat) {
        this.seat = seat;
    }

    public Booking getBooking() {
        return this.booking;
    }

    public void setBooking(Booking booking) {
        this.booking = booking;
    }

    public FlightClass getFlightClass() {
        return this.flightClass;
    }

    public void setFlightClass(FlightClass flightClass) {
        this.flightClass = flightClass;
    }

}